package main

import (
	"fmt"
)

/*
    编译不成功，报错
	接口  go为了实现多态
	定义接口
	接口的使用
*/
type I_name interface {
	Printflm()
}

//接口的实现
func TS_Func(data I_name) {
	data.Printflm()
}

//定义结构
type A1 struct {
}

func (this *A1) Printflm() {
	fmt.Println("A1 Printflm")
}

//定义结构
type B1 struct {
}

func (this *B1) Printflm() {
	fmt.Println("BI Printflm")
}
func main() {
	fmt.Println("wujiangpan")
	data1 := A1()
	TS_Func(&data1)
	data2 := B1()
	TS_Func(&data2)

}
